import { defineStore } from "pinia";
import { setting } from "~/assets/setting/setting";
export const chatSettingStore = defineStore(
  "chatSettingStore",
  () => {
    const chatSettings = ref<FormTemplatesOptions>({});
    if (JSON.stringify(chatSettings.value) === "{}") {
      chatSettings.value = setting.options as FormTemplatesOptions;
    }
    const getChatSettings = () => {
      return chatSettings;
    };
    return {
      chatSettings,
      getChatSettings,
    };
  },
  {
    persist: persist(),
  }
);
